It is often the case that an information processing system used for business includes a database. For example, there is provided a server apparatus (DB server) configured to manage a database, and the DB server receives a processing request from a terminal apparatus or a server apparatus (DB client) configured to execute application software. The DB server performs a process such as searching or updating data in a database according to the received processing request, and returns the processing result to the DB client.
A DB server may treat, as a single transaction, a series of updating processes performed according to a plurality of mutually related processing requests. A transaction has a property (atomicity) ensuring that either all or none of the series of updating processes are performed in the database, and it never happens that only a part of them are performed. Completing a transaction and reflecting the result thereof in the database may be referred to as “commit”, whereas cancelling a transaction halfway without reflecting the result thereof in the database may be referred to as “rollback”.
For example, the DB server, upon receiving a processing request instructing an updating process, separately stores the details of the updating, without updating the database at that stage. The DB server, upon receiving a commit request belonging to the same transaction as that of the preceding processing request, reflects the held details of the updating in the database. In addition, the DB server, upon receiving a rollback request belonging to the same transaction as that of the preceding processing request, discards the held details of the updating.
Some information processing systems including databases are expected to keep operating for a long time so as not to terminate the business service. On the other hand, there may be a case where the DB server has to be temporarily shut down upon occurrence of failure of the DB server or when maintenance work is performed. Therefore, a redundant DB server may be provided to enhance the availability of the database. For example, two DB servers holding databases storing identical contents are prepared, one of the servers being specified as an active server which executes transactions and the other being specified as a standby server which synchronizes with the database of the active server without directly executing transactions. When a failure occurs in the active server, or when maintenance work of the active server is performed, the DB server executing transactions is switched to the standby server.
With regard to switching of DB servers, the following techniques are proposed, for example.
There is proposed a switching method which switches the host computer executing online transactions from a main host computer to a sub host computer, according to a switching instruction. The switching method waits until a request which has reached the main host computer before issuance of the switching instruction is processed by the main host computer, establishes the database of the main host computer, and updates the database of the sub host computer so that the contents thereof become identical to those of the established database of the main host computer. Requests having reached the main host computer after issuance of the switching instruction are kept waiting in the main host computer, and executed by the sub host computer after update of the database of the sub host computer.
In addition, there is proposed a recovery system which synchronizes the database of the main storage apparatus with the database of the sub storage apparatus for each transaction. In the recovery system, the main storage apparatus, when committing a transaction, transmits a log indicating the details of the updating in the transaction to the sub storage apparatus. The sub storage apparatus updates the database of the sub storage apparatus based on the received log.
In addition, there is proposed a database system which enables maintenance work of the regular system by switching from the regular system to a substitute system. In the database system, newly putting transactions into the regular system is terminated when switching to the substitute system. When a transaction being executed is committed by the regular system, update data of the transaction is transmitted from the regular system to the substitute system and the database of the substitute system is synchronized with that of the regular system. Subsequently, putting new transactions into the substitute system is started upon completion of all the transactions in the regular system.
In addition, there is proposed a database system in which an application server requests both the main DB server and the sub DB server to manipulate data. In the database system, the main DB server and the sub DB server generate logs of data manipulation respectively, and only the main DB server notifies the application server of completion of the data manipulation. Subsequently, when the application server requests the main DB server and the sub DB server to commit a transaction, each of the main DB server and the sub DB server updates the databases based on the log, and only the main DB server notifies the application server of completion of the committing.
Japanese Laid-Open Patent Publication No. 2000-89993
Japanese Laid-Open Patent Publication No. 2006-48103
Japanese Laid-Open Patent Publication No. 2010-33398
Japanese Laid-Open Patent Publication No. 2012-155499
However, in switching apparatuses executing transactions, techniques as proposed in the Japanese Laid-Open Patent Publication No. 2000-89993, Japanese Laid-Open Patent Publication No. 2006-48103, and Japanese Laid-Open Patent Publication No. 2010-33398 may result in causing a temporary increase of the load on the switching destination apparatus. Accordingly, there is a problem that the response performance of database access may worsen at the time of switching.
For example, with the method which waits for completion of a transaction being executed in the switching source apparatus before starting to put a processing request of a new transaction into the switching destination apparatus, a large amount of processing requests accumulated in the course of switching may be put into the switching destination apparatus at a time. Therefore, the load increases immediately after the switching, which may result in a degraded response performance. In addition, there is also conceivable a method which rolls back a transaction being executed in the switching source apparatus and immediately starts putting a processing request into the switching destination apparatus. With this method, however, the transaction rolled back in the switching source apparatus is redone from scratch in the switching destination apparatus, thus temporarily increasing the load on the switching destination apparatus.
On the other hand, with the proposed technique of Japanese Laid-Open Patent Publication No. 2012-155499 which synchronizes intermediate states of a transaction among a plurality of apparatuses, the load on the standby system in normal operation may be approximately as large as that on the active system. Accordingly, there is a problem that a large amount of computational resources are prepared also for the standby system and, in addition, it becomes difficult to effectively use the computational resources of the standby system for other than transaction control.